package com.linwen.javase.jvm;

/**
 * @ClassName Main
 * @Description
 * @Author lin
 * @Date 2022/7/13 上午12:21
 * @Version V1.0
 */
public class Main {
    public static void main(String[] args) {
        System.out.println(Test.name);
    }
    static class Test{
        // 定义为final的默认是不会再改变的，会在常量池中直接对属性进行替换，不会加载类
        // private static final String name = "zhangsan";
        private static  String name = "zhangsan";
        static{
            System.out.println("初始化");
        }
    }
}
